home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Language/OS - Multiplatform Resource Library
/
LANGUAGE OS.iso
/
lisp
/
eulisp
/
mpfeel.lha
/
MPFeel
/
Plurals
/
mp_gc.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-05-12
|
2KB
|
70 lines
/*
* MP_Lisp
*
* Author: S.C.Merrall
*
* File: mp_gc.h
*
* Contents:
*
* Description: Declarations of those things that need to be visible
* to the rest of the lisp code. That is the memory
* and the allocation routine.
*
* Change History:
*
* Date Name Comment
* -------- ---- -------
* 16:06:91 SCM Created
*
*/
extern plural heap_header heap_memory[]; /* All memory always visible */
#ifdef __STDC__
extern int mp_alloc( plural int, plural int, object );
extern void mp_gc( void );
#else
extern int mp_alloc( );
extern void mp_gc( );
#endif
/* GC MESSAGE: THis is so that we know what operation caused the GC
* -- ------- Not that vital but coule be useful
*/
extern char *gc_message;
#define set_gc_message(m) gc_message=dbg_g_fname
/* GC Protection: Way of adding extra roots to the gcer, this is so that
* temporary variable will be preserved if a GC is invoked
*/
#define MAX_GC_ROOTS 15
extern int next_gc_root;
extern plural natural *gc_roots[];
#define GC_Protect(arg) gc_roots[next_gc_root++]=((next_gc_root==MAX_GC_ROOTS) ? (plural natural *) fprintf(dbg,"%s : ERROR, Exhausted GC Protect stack\n",dbg_fname) : (arg,/*printf("next_gc_root=%d\n",next_gc_root),*/&arg))
#define GC_UnProtect(n) (((next_gc_root-=n)<0) ? fprintf(dbg,"%s : ERROR, GC Protect stack underflow\n",dbg_fname) : next_gc_root)
/* Scratch Memory: Work space, all the same size, on each processor,
* ------- ------ there is a scratch space on the the fe for the total
* scratch space on teh processor array.
*/
#define SCRATCH_MEMORY_SIZE 64 /* 64 Bytes */
extern plural char scratch[];
extern char acu_scratch[];